package com.design_pattern.proxy;

public class Main {
    public static void main(String[] args) {
//        MyProxy myProxy = new MyProxy();
//        InterFace o = (InterFace)myProxy.bind(new Inter());
//        o.play();

        InterFace o = (InterFace) InterceptorProxy.bind(new Inter("小埋"), "proxy.DIYInterceptor");
        InterFace o2 = (InterFace) InterceptorProxy.bind(o, "proxy.DIY2Interceptor");
        o2.play("aaa");
//
//        if(o2 instanceof  InterFace){
//            InterFace interFace = (InterFace)o2;
//            interFace.play("233");
//        }


    }
}
